<template>
  <view>
    <BackgroundBar title="海岛" :back="true"></BackgroundBar>

    <uv-list :enableBackToTop="true" @scrolltolower="scrolltolower">
      <uv-list-item v-for="(item, index) of list" :key="index">
        <view @click="goDetail(item)">
          <ListItem :item="item"></ListItem>
        </view>
      </uv-list-item>
    </uv-list>
  </view>
</template>

<script setup>
import { ref } from "vue";
import BackgroundBar from "/components/NavigationBar/background.vue";
import ListItem from "./components/ListItem.vue";

import articleManagement from "/api/articleManagement.js";

const list = ref([
  { id: 1, type: "system" },
  { id: 2, type: "reply" },
  { id: 3, type: "fans" },
  { id: 4, type: "wechat" },
]);

const scrolltolower = () => {};

const goDetail = (item) => {
  uni.navigateTo({ url: `/pages/message/detail?id=${item.id}` });
};

articleManagement.getAllMessage();
</script>

<style lang="scss"></style>
